import Vue from 'vue'
import App from './App'
import router from './router'
import VueRouter from 'vue-router'
import setPlugin from '@/plugins'
import '@/assets/scss/index.scss'
import store from '@/store'

Vue.config.productionTip = false

setPlugin()

// 解决vue-router报NavigationDuplicated: Avoided redundant navigation to current location 的问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})